/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package uk.ac.staffs.student.autopilot.packet;

/**
 * 
 * @author Peter
 */
public class RtfPacket implements PacketInterface {

    private int dataType;
    private int rtfFlag;
    private final int checkSum;

    public RtfPacket(final int dataType, final int rtfFlag, final int checkSum) {
        super();
        this.dataType = dataType;
        this.rtfFlag = rtfFlag;
        this.checkSum = checkSum;
    }

    @Override
    public int getPacketType() {

        return dataType;
    }

    @Override
    public String getPayload() {
        // TODO Auto-generated method stub
        return "" + rtfFlag + "";
    }

    /**
     * @return the checkSum
     */
    @Override
    public int getCheckSum() {
        return checkSum;
    }

    /**
     * @return the dataType
     */
    public int getDataType() {
        return dataType;
    }

    @Override
    public String toString() {
        return "RtfPacket [dataType=" + dataType + ", rtfFlag=" + rtfFlag
                + ", checkSum=" + checkSum + "]";
    }

    public int getRtfFlag() {
        return rtfFlag;
    }

    public void setRtfFlag(final int rtfFlag) {
        this.rtfFlag = rtfFlag;
    }

    public void setDataType(final int dataType) {
        this.dataType = dataType;
    }

}
